home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 326-350 / disk_346 / patchntsc / patchntsc.asm < prev    next >
Assembly Source File  |  1992-05-06  |  2KB  |  137 lines

  1. *
  2. * PatchNTSC.asm
  3. *
  4. * Patches "OpenScreen()" so that Screens higher than 216
  5. * will have the "ViewMode->Interlace"-Flag set
  6. *
  7. * Allows NTSC-Users to use PAL programs without loosing the
  8. * bottom of screen
  9. *
  10. * © 1990 by Oliver Wagner
  11. *        Landsberge 5
  12. *        4322 Sprockhövel
  13. *        West Germany
  14. *
  15. * Freely distributable IF no charge is made for anything!
  16. * Darf nicht von Mitgliedern der "Schwarzen Liste" der PD-Vertreiber
  17. * (erstellt durch die AmigaUserGroupSwitzerland AUGS) genutzt/verbreitet
  18. * werden!
  19. *
  20. * A68k PatchNTSC.asm
  21. * BLINK PatchNTSC.asm,lib:small.lib to PatchNTSC
  22. *
  23.  
  24. call    MACRO
  25.     xref    _LVO\1
  26.     jsr    _LVO\1(a6)
  27.     ENDM
  28. jump    MACRO
  29.     xref    _LVO\1
  30.     jmp    _LVO\1(a6)
  31.     ENDM
  32.  
  33.     CODE
  34.     move.l    4,a6
  35.     move.l    $114(a6),a0
  36.     moveq    #0,d7
  37.     tst.l    $ac(a0)
  38.     bne.s    fromcli
  39.     lea    $5c(a0),a0
  40.     call    WaitPort
  41.     call    GetMsg
  42.     move.l    d0,d7
  43. fromcli:
  44.     lea    dosname(pc),a1
  45.     call    OldOpenLibrary
  46.     move.l    d0,d6
  47.     lea    intname(pc),a1
  48.     call    OldOpenLibrary
  49.     move.l    d0,a5
  50.     move.l    -196(a5),a3
  51.     cmp.l    #'Olli',20(a3)
  52.     bne.s    install
  53. * remove patch
  54.     move.l    a3,a1
  55.     move.l    16(a1),-196(a5)
  56.     moveq    #24,d0
  57.     call    FreeMem
  58.     lea    remmsg(pc),a4
  59. exit:
  60.     move.l    d6,a6
  61.     tst.l    d7
  62.     bne.s    fromwb
  63.     call    Output
  64.     bra.s    writeit
  65. fromwb:
  66.     lea    winddef(pc),a0
  67.     move.l    a0,d1
  68.     move.l    #1005,d2
  69.     call    Open
  70.     move.l    d0,d4
  71.     beq.s    nowrite
  72. writeit:
  73.     moveq    #-1,d3
  74.     move.l    a4,d2
  75.     move.l    d0,d1
  76. len:
  77.     addq.l    #1,d3
  78.     tst.b    (a4)+
  79.     bne.s    len
  80.     call    Write
  81.     tst.l    d7
  82.     beq.s    nowrite
  83.     moveq    #127,d1
  84.     call    Delay
  85.     move.l    d4,d1
  86.     call    Close
  87. nowrite:
  88.     move.l    4,a6
  89.     tst.l    d7
  90.     bne.s    replywb
  91.     moveq    #0,d0
  92.     rts
  93. replywb:
  94.     move.l    d7,a1
  95.     jump    ReplyMsg
  96.  
  97. install:
  98.     lea    insmsg(pc),a4
  99.     moveq    #0,d1
  100.     moveq    #24,d0
  101.     call    AllocMem
  102.     move.l    d0,d4
  103.     lea    old+2(pc),a0
  104.     move.l    a3,(a0)
  105.     lea    newopen(pc),a0
  106.     move.l    d0,a1
  107.     moveq    #5,d0
  108. copy:
  109.     move.l    (a0)+,(a1)+
  110.     dbf    d0,copy
  111.     move.l    d4,-196(a5)
  112.     bra.s    exit
  113.  
  114. newopen:
  115.     cmp.w    #216,6(a0)
  116.     ble.s    old
  117.     or.w    #4,12(a0)
  118. old:
  119.     jmp    $f000000
  120.     dc.l    'Olli'
  121.  
  122. dosname:
  123.     dc.b    "dos.library",0
  124. intname:
  125.     dc.b    "intuition.library",0
  126. remmsg:
  127.     dc.b    10,$9b,"33;1m PatchNTSC ",$9b,"0;1m removed!",10,10,0
  128. insmsg:
  129.     dc.b    10,$9b,"33;1m PatchNTSC ",$9b,"0;1m installed!",10
  130.     dc.b    " © 1990 by Oliver Wagner / Ultimate Computer Arts",10
  131.     dc.b    $9b,"0m 'OpenScreen()' patched for Height >216",10,10,0
  132. winddef:
  133.     dc.b    "con:30/40/420/61/PatchNTSC",0
  134.  
  135.     END
  136.  
  137.